<?php
class BaseModelSet extends BaseModelObject {

	public static function recursiveMkdir($pathname, $mode=0700) {		
		is_dir(dirname($pathname)) || self::recursiveMkdir(dirname($pathname), $mode);
		return is_dir($pathname) || mkdir($pathname, $mode);
	}

	public static function cookie($var, $value, $life = 0, $prefix = 1) {
		return @setcookie(($prefix ? COOKIE_PRE : '').$var, $value, ($life ? TIME + $life : 0), COOKIE_PATH, $cookiedomain, 0, TRUE);
	}
		
	public static function recursiveImplode($glue, $pieces) {
	  foreach( $pieces as $r_pieces ) {
		if( is_array($r_pieces) ){
		  	$retVal[] = self::recursiveImplode( $glue, $r_pieces );
		}
		else{
		  	$retVal[] = $r_pieces;
		}
	  }
	  return @implode($glue, $retVal);
	} 
}
?>